



function setCookie ( name, value, expirySeconds ) {
	var expiryDate = new Date();
	expiryDate.setTime(expiryDate.getTime()+(expirySeconds*1000));
	var cookieString = name + "="
							+ value
							+ "; expires="
							+ expiryDate.toGMTString()
							+ "; path=/";
	document.cookie = cookieString;
}


function getCookie ( name ) {
	var nametag = name+"=";
	var cookieArray = document.cookie.split(';');
	for(var i=0; i < cookieArray.length; i++) {
		var c = cookieArray[i];
		while (c.charAt(0) == ' ') {
			c = c.substring(1,c.length);
		}
		if(c.indexOf(nametag) == 0) {
			return c.substring(nametag.length, c.length);
		}
	}
	return null;
}




function deleteCookie ( name ) {
	setCookie(name,"",-1);
}